package com.lagou.edu.pojo;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.lang.Nullable;
import org.springframework.stereotype.Component;

/**
 * @author 应癫
 */
@Component
public class Result implements BeanPostProcessor {

    /**
     * BeanPostProcessor的初始化方法
     */
     public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
         // 代码逻辑
        return bean;
    }

    /**
     * BeanPostProcessor的后置处理方法
     */
     public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
         // 代码逻辑
        return bean;
    }


    private String status;
    private String message;

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        return "Result{" +
                "status='" + status + '\'' +
                ", message='" + message + '\'' +
                '}';
    }
}
